package cn.fzm.demo02;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Dremeue
 * @create 2019-09-25 1:26
 **/
@Service(value = "bookService")
public class BookService {

    // @Autowired // 直接根据类名去寻找对象, 与类名的value值无关
    @Resource(name = "bookDao")
    private BookDao bookDao;

    public BookDao getBookDao() {
        return bookDao;
    }

    public void setBookDao(BookDao bookDao) {
        this.bookDao = bookDao;
    }

    public void add() {
        bookDao.add();
    }
}
